473,426 Members | 1,519 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

onmousemove event fires without mouse movement

In IE (tested IE6 on W2k&WXP) onmousemove event appears to fire
continually
when mouse is over the document and not moving or touched at all, even
when
mouse is physically detached from the computer. Same page on Firefox
works
well (event fires only when mouse moves, not when it is static on the
document). Seems a bug, doesn't it? Anyone knows something about this
or a
solution?
Used code:
<script: JavaScript>
document.onmousemove=doit
function doit()
{alert()}
</script>
gives continuous alerts as long as mouse is over document

Oct 17 '05 #1
5 5477

Ravi wrote:
In IE (tested IE6 on W2k&WXP) onmousemove event appears to fire
continually
when mouse is over the document and not moving or touched at all, even
when
mouse is physically detached from the computer. Same page on Firefox
works
well (event fires only when mouse moves, not when it is static on the
document). Seems a bug, doesn't it? Anyone knows something about this
or a
solution?
Used code:
<script: JavaScript>
document.onmousemove=doit
function doit()
{alert()}
</script>
gives continuous alerts as long as mouse is over document


I would guess that the clearing of the alert box is triggering a mouse
move event.

Try:

function doit(){ window.status=new Date().getTime(); }

--
S.C.

Oct 17 '05 #2
The other function you suggested also does the same. The status bar
gets updated with the time.
--
Ravi

Oct 18 '05 #3
Ravi <ra********@gmail.com> wrote in message news:11**********************@o13g2000cwo.googlegr oups.com...
The other function you suggested also does the same. The status bar
gets updated with the time. <script: JavaScript>


I'm surprised that worked at all:

<script type='text/javascript'>

Can you show the entire code?

--
S.C.
Oct 18 '05 #4
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Example for the onmouseover Event</TITLE>
<SCRIPT>
var counter = 0;
function fnTrackMouse(){
counter++;
window.status="Coords: (" + event.clientX + ", " + event.clientY + ")
" + counter;
}
</SCRIPT>

<!-- SAMPLE_STYLE_END -->
</HEAD>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->

<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
LINK="#000000" VLINK="#808080" ALINK="#000000"
onmousemove="fnTrackMouse()">
<BLOCKQUOTE CLASS="body">

<H1>onmousemove Sample</H1>
<P>This sample demonstrates the use of the <b>onmousemove</b> event to
monitor the location of the mouse cursor in a specified region of the
page.
When the mouse is moved over the gray <b>DIV</b>, the yellow
<b>SPAN</b> is updated with the mouse location values obtained from the
<b>clientX</b> and <b>clientY</b> properties on the <b>event</b>
object.</P>

</BLOCKQUOTE>
</BODY>
</HTML>

I have the tried the same example at my office and my home. It behaves
as expected at home(winxphome ie sp2). at office(winXP professional ie
sp2) the counter in the status bar gets incremented with out the
mousemove.

Thanks,
Ravi

Oct 18 '05 #5
Ravi <ra********@gmail.com> wrote in message news:11**********************@g14g2000cwa.googlegr oups.com...
<SNIP>
I have the tried the same example at my office and my home. It behaves
as expected at home(winxphome ie sp2). at office(winXP professional ie
sp2) the counter in the status bar gets incremented with out the
mousemove.

I can only conclude that your office computer is running some other process
(known to you or otherwise) that is interfering with the browsers mouse handling.

--
S.C.

Oct 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Luc The Perverse | last post by:
I admit, I haven't used Dot.Net, so maybe this question applies to either the 2005 Beta or to Dot Net as well. I wanted to create a Mouse Movement Entropy random function generator dialog, a...
2
by: Mariusz | last post by:
Hello, I'm trying to do drag'n'drop where You can see elements that You are dragging (table rows exactly) but I have small problem. Here is code sample var move = false; function...
9
by: VK | last post by:
My original idea of two trains, however pictural it was, appeared to be wrong. The truth seems to be even more chaotic. IE implements its standard down-up model: any mouse event goes from the...
3
by: Logan Mckinley | last post by:
I need to be able to detect mouse movement even when it is not over my application. I can get the mouse cords using MousePosition but I am not sure if there is an event that hits my program when...
5
by: Iouri | last post by:
I have added the Overrides proc onMouseMove like Protected Overrides Sub onMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs) ........... End Sub This proc supposed to fire when I...
8
by: davefromalbury | last post by:
I'm trying to create a basic slider and I'm having absolutely no luck in firefox. Could someone please offer some hints as to what could be wrong? I think it's to do with the focus change upon...
1
by: k.roemke | last post by:
Hello! After a longer time I want to do some javascript again. Task: set content of an iframe to the origin page if the mouse is not moved Problem: <iframe onmousemove="resetCounter();return...
1
by: EddieT | last post by:
Hi, I am planning to override the mouse movement to discrete steps so that i can get a coarser movement of the mouse for easier click of objects. However, I am not getting any trigger in the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.